package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.OrdOperateHistoryMapper;
import com.ruoyi.order.domain.OrdOperateHistory;
import com.ruoyi.order.service.IOrdOperateHistoryService;

/**
 * 订单操作记录表Service业务层处理
 * 
 * @author wpf
 * @date 2023-05-19
 */
@Service
public class OrdOperateHistoryServiceImpl implements IOrdOperateHistoryService 
{
    @Autowired
    private OrdOperateHistoryMapper ordOperateHistoryMapper;

    /**
     * 查询订单操作记录表
     * 
     * @param id 订单操作记录表主键
     * @return 订单操作记录表
     */
    @Override
    public OrdOperateHistory selectOrdOperateHistoryById(Long id)
    {
        return ordOperateHistoryMapper.selectOrdOperateHistoryById(id);
    }

    /**
     * 查询订单操作记录表列表
     * 
     * @param ordOperateHistory 订单操作记录表
     * @return 订单操作记录表
     */
    @Override
    public List<OrdOperateHistory> selectOrdOperateHistoryList(OrdOperateHistory ordOperateHistory)
    {
        return ordOperateHistoryMapper.selectOrdOperateHistoryList(ordOperateHistory);
    }

    /**
     * 新增订单操作记录表
     * 
     * @param ordOperateHistory 订单操作记录表
     * @return 结果
     */
    @Override
    public int insertOrdOperateHistory(OrdOperateHistory ordOperateHistory)
    {
        ordOperateHistory.setCreateTime(DateUtils.getNowDate());
        return ordOperateHistoryMapper.insertOrdOperateHistory(ordOperateHistory);
    }

    /**
     * 修改订单操作记录表
     * 
     * @param ordOperateHistory 订单操作记录表
     * @return 结果
     */
    @Override
    public int updateOrdOperateHistory(OrdOperateHistory ordOperateHistory)
    {
        return ordOperateHistoryMapper.updateOrdOperateHistory(ordOperateHistory);
    }

    /**
     * 批量删除订单操作记录表
     * 
     * @param ids 需要删除的订单操作记录表主键
     * @return 结果
     */
    @Override
    public int deleteOrdOperateHistoryByIds(Long[] ids)
    {
        return ordOperateHistoryMapper.deleteOrdOperateHistoryByIds(ids);
    }

    /**
     * 删除订单操作记录表信息
     * 
     * @param id 订单操作记录表主键
     * @return 结果
     */
    @Override
    public int deleteOrdOperateHistoryById(Long id)
    {
        return ordOperateHistoryMapper.deleteOrdOperateHistoryById(id);
    }
}
